package com.pbdevj.jdbc.model;

import java.io.Serializable;


public class Employee implements Serializable
{
	private static final long serialVersionUID = -6568499654882862879L;
	
	private Integer id;
	
	private String empName;
	
	private Integer age;
	
	private String dept;
	
	public Employee()
	{
		
	}
	
	public Employee(String empName, Integer age, String dept)
	{
		this(null, empName, age, dept);
	}

	public Employee(Integer id, String empName, Integer age, String dept)
	{
		super();
		this.id = id;
		this.empName = empName;
		this.age = age;
		this.dept = dept;
	}

	public Integer getId()
	{
		return id;
	}

	public void setId(Integer id)
	{
		this.id = id;
	}

	public String getEmpName()
	{
		return empName;
	}

	public void setEmpName(String empName)
	{
		this.empName = empName;
	}

	public Integer getAge()
	{
		return age;
	}

	public void setAge(Integer age)
	{
		this.age = age;
	}

	public String getDept()
	{
		return dept;
	}

	public void setDept(String dept)
	{
		this.dept = dept;
	}

	public static long getSerialversionuid()
	{
		return serialVersionUID;
	}

	@Override
	public int hashCode()
	{
		final int prime = 31;
		int result = 1;
		result = prime * result + ((age == null) ? 0 : age.hashCode());
		result = prime * result + ((dept == null) ? 0 : dept.hashCode());
		result = prime * result + ((empName == null) ? 0 : empName.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Employee other = (Employee) obj;
		if (age == null)
		{
			if (other.age != null)
				return false;
		}
		else
			if (!age.equals(other.age))
				return false;
		if (dept == null)
		{
			if (other.dept != null)
				return false;
		}
		else
			if (!dept.equals(other.dept))
				return false;
		if (empName == null)
		{
			if (other.empName != null)
				return false;
		}
		else
			if (!empName.equals(other.empName))
				return false;
		if (id == null)
		{
			if (other.id != null)
				return false;
		}
		else
			if (!id.equals(other.id))
				return false;
		return true;
	}

	@Override
	public String toString()
	{
		return "Employee [id=" + id + ", empName=" + empName + ", age=" + age + ", dept=" + dept + "]";
	}

	
}
